Builder

class Builder(applicationContext: Context = ApplicationHolder.applicationContext, bluetoothScanner: BluetoothLeScannerCompat = BluetoothLeScannerCompat.getScanner(), bluetoothAdapter: BluetoothAdapter? = (applicationContext.getSystemService(Context.BLUETOOTH_SERVICE) as? BluetoothManager)?.adapter, scanSettings: ScanSettings = defaultScanSettings) : BaseScanner.Builder

Builder for creating a DefaultScanner

Parameters

applicationContext

the Context in which Bluetooth should run

bluetoothScanner

the BluetoothLeScannerCompat to use for scanning

bluetoothAdapter

the BluetoothAdapter to use to access Bluetooth

scanSettings

the ScanSettings to apply to the scanner

Constructors

Link copied to clipboard
constructor(applicationContext: Context = ApplicationHolder.applicationContext, bluetoothScanner: BluetoothLeScannerCompat = BluetoothLeScannerCompat.getScanner(), bluetoothAdapter: BluetoothAdapter? = (applicationContext.getSystemService(Context.BLUETOOTH_SERVICE) as? BluetoothManager)?.adapter, scanSettings: ScanSettings = defaultScanSettings)

Functions

Link copied to clipboard
open override fun create(settings: BaseScanner.Settings, coroutineScope: CoroutineScope, scanningDispatcher: CoroutineDispatcher): BaseScanner

Creates a BaseScanner